//
//  SZHomeStatusCell.m
//  Weibo
//
//  Created by Zahi on 2017/7/30.
//  Copyright © 2017年 Zahi. All rights reserved.
//

#import "SZHomeStatusCell.h"
#import "SZHomeOriginalView.h"


@interface SZHomeStatusCell ()

/**原创视图**/
@property (nonatomic, strong) SZHomeOriginalView *originalView;

@end


/*
 1. 原创微博视图 -> UIView
 2. 转发微博视图 -> UIView
 3. 微博toolbar -> UIView
 */

@implementation SZHomeStatusCell

- (void)setStatusVM:(SZStatusVM *)statusVM
{
    _statusVM = statusVM;
    
    self.originalView.statusVM = statusVM;
}

#pragma mark  原创视图
- (SZHomeOriginalView *)originalView
{
    if (_originalView == nil) {
        _originalView = [SZHomeOriginalView new];
    }
    return _originalView;
}



- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self ) {
        
        [self setupUI];
        
    }
    
    return self;
}


- (void)setupUI {
    
    [self.contentView addSubview:self.originalView];
    
    [self.originalView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.trailing.top.equalTo(self.contentView);
        
    }];
    
}

@end
